package com.wbxqy.car_management_system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 用车申请表
 * </p>
 *
 * @author wbxqy
 * @since 2024-07-04
 */
@Getter
@Setter
@TableName("t_car_request_wbxqy")
@ApiModel(value = "CarRequest对象", description = "用车申请表")
public class CarRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("申请ID，主键")
    @TableId(value = "request_id_wbxqy", type = IdType.AUTO)
    private Integer requestIdWbxqy;

    @ApiModelProperty("申请人ID，外键")
    private Integer userIdWbxqy;

    @ApiModelProperty("申请人")
    @TableField(exist = false)
    private User user;

    @ApiModelProperty("申请车辆ID，外键")
    private Integer carIdWbxqy;

    @ApiModelProperty("使用车")
    @TableField(exist = false)
    private Car car;

    @ApiModelProperty("司机ID，外键")
    private Integer driverIdWbxqy;

    @ApiModelProperty("司机")
    @TableField(exist = false)
    private User driver;

    @ApiModelProperty("申请日期")
    private LocalDate requestDateWbxqy;

    @ApiModelProperty("开始时间")
    private LocalDateTime startTimeWbxqy;

    @ApiModelProperty("结束时间")
    private LocalDateTime endTimeWbxqy;

    @ApiModelProperty("是否评论(T 已评论 F 未评论)")
    private String isCommentWbxqy;

    @ApiModelProperty("申请状态（S 待审批、A 已批准、R 已拒绝、行程已结束 E）")
    private String statusWbxqy;

    @ApiModelProperty("拒绝理由")
    private String rejectResonWbxqy;


    @ApiModelProperty("用车目的")
    private String purposeWbxqy;

    @ApiModelProperty("报表")
    private String statementWbxqy;

    @ApiModelProperty("行程列表")
    @TableField(exist = false)
    private List<Trip> tripList;

    @ApiModelProperty("记录创建时间")
    private LocalDateTime createTimeWbxqy;

    @ApiModelProperty("记录更新时间")
    private LocalDateTime updateTimeWbxqy;

    @ApiModelProperty("是否删除标记，逻辑删除")
    private Boolean isDeletedWbxqy;


    @ApiModelProperty("确认人ID,外键")
    private Integer passIdWbxqy;

    @ApiModelProperty("确认时间")
    private LocalDateTime passTimeWbxqy;

    @ApiModelProperty("分配人ID,外键")
    private Integer planIdWbxqy;

    @ApiModelProperty("分配时间")
    private LocalDateTime planTimeWbxqy;


    @ApiModelProperty("审批表图片")
    private String approvalUrlWbxqy;

}
